package com.flnet.foxwash.service.impl;

import java.util.List;

import com.flnet.foxwash.domain.WServiceItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flnet.foxwash.mapper.WShopPriceMapper;
import com.flnet.foxwash.domain.WShopPrice;
import com.flnet.foxwash.service.IWShopPriceService;
import com.flnet.common.support.Convert;

/**
 * 服务价格设定 服务层实现
 * 
 * @author flnet
 * @date 2019-03-20
 */
@Service
public class WShopPriceServiceImpl implements IWShopPriceService 
{
	@Autowired
	private WShopPriceMapper wShopPriceMapper;

	/**
     * 查询服务价格设定信息
     * 
     * @param priceId 服务价格设定ID
     * @return 服务价格设定信息
     */
    @Override
	public WShopPrice selectWShopPriceById(Long priceId)
	{
	    return wShopPriceMapper.selectWShopPriceById(priceId);
	}
	
	/**
     * 查询服务价格设定列表
     * 
     * @param wShopPrice 服务价格设定信息
     * @return 服务价格设定集合
     */
	@Override
	public List<WShopPrice> selectWShopPriceList(WShopPrice wShopPrice)
	{
	    return wShopPriceMapper.selectWShopPriceList(wShopPrice);
	}
	
    /**
     * 新增服务价格设定
     * 
     * @param wShopPrice 服务价格设定信息
     * @return 结果
     */
	@Override
	public int insertWShopPrice(WShopPrice wShopPrice)
	{
	    return wShopPriceMapper.insertWShopPrice(wShopPrice);
	}
	
	/**
     * 修改服务价格设定
     * 
     * @param wShopPrice 服务价格设定信息
     * @return 结果
     */
	@Override
	public int updateWShopPrice(WShopPrice wShopPrice)
	{
	    return wShopPriceMapper.updateWShopPrice(wShopPrice);
	}

	/**
     * 删除服务价格设定对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWShopPriceByIds(String ids)
	{
		return wShopPriceMapper.deleteWShopPriceByIds(Convert.toStrArray(ids));
	}

	/**
	 * 更新服务价格设定对象
	 *
	 * @param wShopPrice 需要更新的数据
	 * @return 结果
	 */
	@Override
	public int changeStatus(WShopPrice wShopPrice) {
		return wShopPriceMapper.updateWShopPrice(wShopPrice);
	}
}
